package corej.course.gui;

import javax.swing.*;
import java.awt.*;

public class TestBorderLayout {
    public static void main(String[] args) {
        JFrame frame = new JFrame("MyFrame");
        frame.setSize(500, 300);

        LayoutManager m = new BorderLayout();
        frame.setLayout(m);

        JButton b1 = new JButton("Button1");
        JButton b2 = new JButton("Button2");
        JButton b3 = new JButton("Button3");
        JButton b4 = new JButton("Button4");
        JButton b5 = new JButton("Button5");

        frame.add(b1);
        frame.add(b2, "South");
        frame.add(b3, "North");
        frame.add(b4, "East");
        frame.add(b5, "West");

        frame.setVisible(true);
    }
}
